package cn.jiyun.arrayList_1_22;



public class Test {

    public void myList(){
        MyList myList = new MyList(3);
        myList.add(3);
        myList.add(2);
        myList.add(6);
        myList.add(8);
        System.out.println(myList.size()); //3
        int i = myList.get(1);
        System.out.println(i);//2
        boolean set = myList.set(1, 8);
        System.out.println(set);//true
        int remove = myList.remove(1);
        System.out.println(remove);//8
        System.out.println(myList.size());//2
        myList.add(8);
        myList.add(9);
        myList.add(33);
        myList.add(2);
        myList.add(44);
        myList.add(32);
        myList.add(24);
        myList.add(77);
        System.out.println(myList.size());//11
        System.out.println(myList.get(9));//77
        int i1 = myList.get(11);//索引越界

    }
}
